import type { formData, resLogin, resRegister } from '@/views/login/type'
import type { changePwd, queryAccountEmail } from '@/views/login/dialog/type'
import http from '../../utils/axios'

// 登录接口
export const useLoginAPI = (data:formData) => http<any,resLogin>({
    url:'/api/login',
    method:'POST',
    data
})
// 注册接口
export const useRegisterAPI = (data:formData) => http<any,resRegister>({
    url:'/api/register',
    method:'POST',
    data
})
// 查询邮箱
export const useVerifyAccountAndEmailAPI = (data:queryAccountEmail) => http<any,queryAccountEmail>({
    url:'/user/verifyAccountAndEmail',
    method:'POST',
    data
})
// 修改忘记密码接口
export const useChangePwdAPI = (data:formData) => http<any,changePwd>({
    url:'/user/changeForgetPwd',
    method:'POST',
    data
})